<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of netgrad</title>
  <meta name="keywords" content="netgrad">
  <meta name="description" content="NETGRAD Evaluate network error gradient for generic optimizers">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../menu.html">Home</a> &gt;  <a href="#">ReBEL-0.2.7</a> &gt; <a href="#">netlab</a> &gt; netgrad.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../menu.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="menu.html">Index for .\ReBEL-0.2.7\netlab&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>netgrad
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>NETGRAD Evaluate network error gradient for generic optimizers</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function g = netgrad(w, net, x, t) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment">NETGRAD Evaluate network error gradient for generic optimizers

   Description

   G = NETGRAD(W, NET, X, T) takes a weight vector W and a network data
   structure NET, together with the matrix X of input vectors and the
   matrix T of target vectors, and returns the gradient of the error
   function evaluated at W.

   See also
   <a href="mlp.html" class="code" title="function net = mlp(nin, nhidden, nout, outfunc, prior, beta)">MLP</a>, <a href="neterr.html" class="code" title="function [e, varargout] = neterr(w, net, x, t)">NETERR</a>, <a href="netopt.html" class="code" title="function [net, options, varargout] = netopt(net, options, x, t, alg);">NETOPT</a></pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="netunpak.html" class="code" title="function net = netunpak(net, w)">netunpak</a>	NETUNPAK Separates weights vector into weight and bias matrices.</li></ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="olgd.html" class="code" title="function [net, options, errlog, pointlog] = olgd(net, options, x, t)">olgd</a>	OLGD	On-line gradient descent optimization.</li></ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function g = netgrad(w, net, x, t)</a>
0002 <span class="comment">%NETGRAD Evaluate network error gradient for generic optimizers</span>
0003 <span class="comment">%</span>
0004 <span class="comment">%   Description</span>
0005 <span class="comment">%</span>
0006 <span class="comment">%   G = NETGRAD(W, NET, X, T) takes a weight vector W and a network data</span>
0007 <span class="comment">%   structure NET, together with the matrix X of input vectors and the</span>
0008 <span class="comment">%   matrix T of target vectors, and returns the gradient of the error</span>
0009 <span class="comment">%   function evaluated at W.</span>
0010 <span class="comment">%</span>
0011 <span class="comment">%   See also</span>
0012 <span class="comment">%   MLP, NETERR, NETOPT</span>
0013 <span class="comment">%</span>
0014 
0015 <span class="comment">%   Copyright (c) Ian T Nabney (1996-2001)</span>
0016 
0017 gradstr = [net.type, <span class="string">'grad'</span>];
0018 
0019 net = <a href="netunpak.html" class="code" title="function net = netunpak(net, w)">netunpak</a>(net, w);
0020 
0021 g = feval(gradstr, net, x, t);</pre></div>
<hr><address>Generated on Tue 26-Sep-2006 10:36:21 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>